package com.credithc.fastdfs.api.web;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.credithc.fastdfs.api.entity.FdfsInfo;
import com.credithc.fastdfs.api.validator.AnnexValidator;
import com.credithc.fastdfs.api.validator.ValidatorParmater;

/**
 * @author Administrator
 * @date 2015年5月13日
 * @time 下午2:57:20 
 */
@Controller
@RequestMapping("/")
public class MainController {
	
	@Resource(name="annexValidatorImpl")
	public AnnexValidator annexValidatorImpl;
	
	@RequestMapping("/main.hc")
	public void mainPage(){
		FdfsInfo fdfsInfo = new FdfsInfo();
		fdfsInfo.setFileType(".txt");
		fdfsInfo.setFileSize(30000l);
		annexValidatorImpl.validateAnnex(fdfsInfo, ValidatorParmater.FileType.IMG.getKey());
	}
}

